const userPionRank=[

    {
        rankName:"***",
        point:'***',
        pointImg:'publicImg/huizhang/0.png'
    },
    {
        rankName:"短工",
        point:'10',
        pointImg:'publicImg/huizhang/1.png'
    },
    {
        rankName:"长工",
        point:'25',
        pointImg:'publicImg/huizhang/2.png'
    },
    {
        rankName:"佃户",
        point:'40',
        pointImg:'publicImg/huizhang/3.png'
    },
    {
        rankName:"贫农",
        point:'80',
        pointImg:'publicImg/huizhang/4.png'
    },
    {
        rankName:"渔夫",
        point:'140',
        pointImg:'publicImg/huizhang/5.png'
    },
    {
        rankName:"猎人",
        point:'230',
        pointImg:'publicImg/huizhang/6.png'
    },
    {
        rankName:"中农",
        point:'365',
        pointImg:'publicImg/huizhang/7.png'
    },
    {
        rankName:"富农",
        point:'500',
        pointImg:'publicImg/huizhang/8.png'
    },
    {
        rankName:"掌柜",
        point:'700',
        pointImg:'publicImg/huizhang/9.png'
    },
    {
        rankName:"商人",
        point:'1000',
        pointImg:'publicImg/huizhang/10.png'
    },
    {
        rankName:"衙役",
        point:'1500',
        pointImg:'publicImg/huizhang/11.png'
    },
    {
        rankName:"小财主",
        point:'2200',
        pointImg:'publicImg/huizhang/12.png'
    },
    {
        rankName:"大财主",
        point:'3000',
        pointImg:'publicImg/huizhang/13.png'
    },
    {
        rankName:"小地主",
        point:'4000',
        pointImg:'publicImg/huizhang/14.png'
    },
    {
        rankName:"大地主",
        point:'5500',
        pointImg:'publicImg/huizhang/15.png'
    },

    {
        rankName:"知县",
        point:'7700',
        pointImg:'publicImg/huizhang/16.png'
    },
    {
        rankName:"通判",
        point:'10000',
        pointImg:'publicImg/huizhang/17.png'
    },
    {
        rankName:"知府 ",
        point:'14000',
        pointImg:'publicImg/huizhang/18.png'
    },
    {
        rankName:"总督",
        point:'20000',
        pointImg:'publicImg/huizhang/19.png'
    },
    {
        rankName:"巡抚",
        point:'30000',
        pointImg:'publicImg/huizhang/20.png'
    },
    {
        rankName:"丞相",
        point:'45000',
        pointImg:'publicImg/huizhang/21.png'
    },
    {
        rankName:"帝王",
        point:'70000',
        pointImg:'publicImg/huizhang/22.png'
    },


    ];



 let rankName='大地主';

  let rankItemHtml='',rankItem0Html='';

  rankItem(rankName);


    function rankItem(rankName) {

        for(let j=1,i=userPionRank.length;j<i;j++){

            if(userPionRank[j].rankName==rankName){


                for(let m=1;m<j;m++){
                    rankItemHtml +=
                        '         <div class="rankItem">' +
                        '                <span class="pointNumber">'+userPionRank[m].point+'</span>' +
                        '                <span class="pointName">'+userPionRank[m].rankName+'</span>' +
                        '                <span class="rankImg"><img src="'+userPionRank[m].pointImg+'"></span>' +
                        '         </div>'
                }

                 rankItem0Html=' <div class="rankItem0">'+
                    '               <span class="pointNumber">'+userPionRank[j+1].point+'</span>' +
                    '                <span class="pointName">*****</span>' +
                    '               <span class="rankImg"><img src="publicImg/huizhang/0.png"></span>' +
                    '               </div>'

            }

        }


        $('#myPointRankList').append(rankItemHtml+rankItem0Html)


    //
    //     userMessageLeft_span">去完善<
    //     serMessage_span">去完善</span
    //     serMessageRight_span">去完善<

    }

//切换


$('.myPointRank').click(function () {

    $(this).addClass('addcolor');

    $('.getPoint').removeClass('addcolor');

    $('.deductPoint').removeClass('addcolor');


    $('.myPointRankList').show();
    $('.getPointInfo').hide();
    $('.deductPointInfo').hide();

});




$('.getPoint').click(function () {

    $(this).addClass('addcolor');

    $('.myPointRank').removeClass('addcolor');

    $('.deductPoint').removeClass('addcolor');


    $('.myPointRankList').hide();
    $('.getPointInfo').show();
    $('.deductPointInfo').hide();

});



$('.deductPoint').click(function () {

    $(this).addClass('addcolor');

    $('.getPoint').removeClass('addcolor');

    $('.myPointRank').removeClass('addcolor');


    $('.myPointRankList').hide();
    $('.getPointInfo').hide();
    $('.deductPointInfo').show();

});


